﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using V5_Common;
using V5_Common.FrameWork;

namespace V5_Data {
    public class V5HotKeyWordHelper : IV5Helper {
        private static readonly V5HotKeyWordHelper m_Instance = new V5HotKeyWordHelper();
        /// <summary>
        /// 
        /// </summary>
        public static V5HotKeyWordHelper Instance {
            get { return m_Instance; }
        }


        private string _Pager = string.Empty;

        public string Pager {
            get { return _Pager; }
            set { _Pager = value; }
        }

        #region
        public DataTable Query_By(string what, string where, string orderby, int limit) {
            DataTable dt = V5.SQL.Query_By(what, "Tbl_HotKeyWord", where, orderby, limit);
            return dt;
        }

        public DataTable Query_By_List(string what, string where, string orderby, int limit) {
            throw new Exception();
        }

        public DataTable Query_By_Pager(string what, string where, string orderby, int limit, int pageIndex, string UrlList) {
            throw new Exception();
        }

        public DataRow Get_By(string ID) {
            DataTable dt = V5.SQL.Query_By("*", "Tbl_HotKeyWord", "ID=" + ID + "", "", 1);
            return dt.Rows[0];
        }

        public DataRow Get_By_List(string ClassID) {
            throw new Exception();
        }

        public string UrlView(object attributes) {
            return V5.Url.Action("KeyWord/View", attributes);
        }

        public string UrlList(object attributes) {
            return V5.Url.Action("KeyWord/List", attributes);
        }
        #endregion


        public string UrlIndex() {
            throw new NotImplementedException();
        }

        public string UrlIndex(int showType) {
            throw new NotImplementedException();
        }

        public string UrlView(object attributes, int showType) {
            throw new NotImplementedException();
        }

        public string UrlList(object attributes, int showType) {
            throw new NotImplementedException();
        }

        public string UrlSearch(object attributes) {
            throw new NotImplementedException();
        }

        public string UrlSearch(object attributes, int showType) {
            throw new NotImplementedException();
        }
    }
}